﻿<%@ Page Title="" Language="C#" MasterPageFile="~/HR/HRMasterPage.master" AutoEventWireup="true" CodeFile="user-list.aspx.cs" Inherits="HR_user_list" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" > </cc1:ToolkitScriptManager>
<div class="block">
    <div class="secondary-navigation">
                    <ul class="wat-cf">
                        <li class="active first"><a href="#">Job Seeker</a></li>
                    </ul>
                </div>
        <div class="content">
        <h2 class="title">Job Seeker List</h2>
            <div class="inner">
            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnClear" EventName="Click" />
                </Triggers>
                <ContentTemplate>
                <asp:Panel ID="Panel1" runat="server" GroupingText="Search"  Width="390px">
                <div style="margin:10px;">
                <table>
                <tr>
                <td>Name</td>
                <td>:</td>
                <td><asp:TextBox ID="txtUser" runat="server" Width="200px"></asp:TextBox></td>
                </tr>
                <tr>
                <td>Email</td>
                <td>:</td>
                <td><asp:TextBox ID="txtUserEmail" runat="server" Width="200px"></asp:TextBox></td>
                </tr>
                <tr>
                <td>Contact</td>
                <td>:</td>
                <td><asp:TextBox ID="txtUserContact" runat="server" Width="200px"></asp:TextBox></td>
                </tr>
                <tr id="Tr1" visible="false" runat="server">
                <td>Verified By</td>
                <td>:</td>
                <td><asp:TextBox ID="txtVerifiedBy" runat="server" Width="200px"></asp:TextBox></td>
                </tr>
                <tr visible="false" runat="server">
                <td>Created Date Range</td>
                <td>:</td>
                <td><asp:TextBox ID="txtStartDate" runat="server" Width="80px"></asp:TextBox>
                <cc1:CalendarExtender ID="txtStartDate_CalendarExtender" runat="server" 
            Enabled="True" TargetControlID="txtStartDate" Format="dd/MM/yyyy">
        </cc1:CalendarExtender>
         to <asp:TextBox ID="txtEndDate" runat="server" Width="80px"></asp:TextBox>
         <cc1:CalendarExtender ID="txtEndDate_CalendarExtender" runat="server" 
            Enabled="True" TargetControlID="txtEndDate" Format="dd/MM/yyyy">
        </cc1:CalendarExtender>
        <br />
        <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="CompareValidator" 
                        ControlToCompare="txtStartDate" ControlToValidate="txtEndDate" Type="Date"
                        Operator="GreaterThan">*End Date must greater than Start Date</asp:CompareValidator>
        </td>
                </tr>
                <tr>
                <td>Preferred Country</td>
                <td>:</td>
                <td><asp:DropDownList
                        ID="ddlCountry" runat="server">
                        <asp:ListItem Value="All">All</asp:ListItem>
                        <asp:ListItem Value="HK">Hong Kong</asp:ListItem>
                        <asp:ListItem Value="ID">Indonesia</asp:ListItem>
                        <asp:ListItem Value="MY">Malaysia</asp:ListItem>
                        <asp:ListItem Value="SG">Singapore</asp:ListItem>
                        <asp:ListItem Value="TH">Thailand</asp:ListItem>
                    </asp:DropDownList>
                </td>
                </tr>
                <tr>
                <td></td>
                <td></td>
                <td><asp:Button ID="btnSearch" runat="server" Text="Search" 
                        onclick="btnSearch_Click" Width="80px" Height="30px" />
                         &nbsp;<asp:Button ID="btnClear" runat="server" Text="Clear" 
                        Width="80px" Height="30px" onclick="btnClear_Click" /></td>
                </tr>
                </table>
                    
                    </div>
                </asp:Panel>
                </ContentTemplate>
                </asp:UpdatePanel>
                <br />
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click" />
                </Triggers>
                <ContentTemplate>
                <asp:Label ID="lblCurrpageTop" runat="server"></asp:Label>
                <asp:GridView ID="gvUser" runat="server" AutoGenerateColumns="false" OnRowCommand="gvUser_RowCommand"
                    CssClass="table" AlternatingRowStyle-CssClass="even" 
                    RowStyle-CssClass="odd" GridLines="None" onrowdatabound="gvUser_RowDataBound">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField SortExpression="Name" HeaderText="Name">
                            <ItemTemplate>
                                <asp:Label ID="lblSalutation" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Salutation") %>'></asp:Label>&nbsp;<asp:Label ID="lblName" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Name") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="Email" HeaderText="Email" />
                        <asp:BoundField DataField="ContactNumber" HeaderText="Contact Number" />
                        <asp:BoundField DataField="EmploymentStatus" HeaderText="Employment Status" />
                        <asp:BoundField DataField="PreferredCountry" HeaderText="Preferred Country" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" />
                        <asp:BoundField DataField="CreatedDate" HeaderText="Created Date" />
                        <asp:TemplateField SortExpression="AttachCV" HeaderText="AttachCV" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lblAttachCV" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "AttachCV") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                            <a href='<%# "user-details.aspx?uid=" +  DataBinder.Eval(Container.DataItem, "UID") %>'
                                       >View</a> 
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <asp:Label ID="lblCurrpage" runat="server"></asp:Label>
                </ContentTemplate>
                </asp:UpdatePanel>
                
                
            </div>
        </div>
    </div>
                <asp:HiddenField ID="hidUser" runat="server" />
                <asp:HiddenField ID="hidUserEmail" runat="server" />
                <asp:HiddenField ID="hidUserContact" runat="server" />
                <asp:HiddenField ID="hidVerifiedBy" runat="server" />
                <asp:HiddenField ID="hidStartDate" runat="server" />
                <asp:HiddenField ID="hidEndDate" runat="server" />
                <asp:HiddenField ID="hidCountry" runat="server" Value="All" />
</asp:Content>

